const mongoose = require('mongoose')
const {formatDate} = require('../../utils')
const ResumeSchema = new mongoose.Schema({
    userId: {type: String, required: true},
    name: {type: String, required: true},
    username: {type: String, required: true},
    userImg: {type: String, required: true},
    basicInfo: {type: Object, required: true},
    selfAssessment: {type: String, required: true},
    abilities: {type: Array, required: true},
    experiences: {type: Array, required: true},
    projects: {type: Array, required: true},
    demos: {type: Array, required: true},
    edus: {type: Array, required: true},
    certificates: {type: Array, required: true},
    wordUrl: {type: String,},
    pdfUrl: {type: String,},
    status: {type: Number, required: true},
    ctime: { type: String, required: true, default: formatDate() },
})

const Resume = mongoose.model('resumes', ResumeSchema)

module.exports = Resume